#ifndef SYSTEM_SHARED_H
#define SYSTEM_SHARED_H 1

#define MAXIMUM_COMMANDLINE 8192

//
// Windows Headers
//
#ifdef _WIN32
#	define STRICT 1
#	define VC_EXTRALEAN 1
#	define WIN32_LEAN_AND_MEAN 1
#	include <Windows.h>
#	include <ShellAPI.h>
#	ifdef _DEBUG
#		define _CRTDBG_MAP_ALLOC 1
#		include <stdlib.h>
#		include <crtdbg.h>
#		define new new( _NORMAL_BLOCK, __FILE__, __LINE__ )
#		define RegisterApplication(x) INT WINAPI WinMain( HINSTANCE, HINSTANCE, PSTR, INT ) {_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); x application; return application.run();} struct dummy {}
#	else
#		include <stdlib.h>
#		define RegisterApplication(x) INT WINAPI WinMain( HINSTANCE, HINSTANCE, PSTR, INT ) {x application; return application.run();} struct dummy {}
#	endif
#else
#	define RegisterApplication(x) int main( int argc, char *argv[] ) {x application( argc, argv ); return application.run();} struct dummy {}
#endif

#endif
